package com.hns.phone.service.web;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hns.can.common.vo.CommonParamsVo;
import com.hns.can.common.web.BaseController;
import com.hns.phone.service.service.PhoneMotionStatusService;
import com.hns.phone.service.vo.PhoneDrivingRecordAnalysisVo;

/**
 * 车辆运行状态controller
 * @author:zhangy
 * @email:zhangyu2222z@sina.cn
 * @version Revision 2.0.0
 */
@Controller
@RequestMapping("/api/phoneMotionStatus")
public class PhoneMotionStatusController extends BaseController {
	
	@Autowired
	private PhoneMotionStatusService phoneMotionStatusService;
	
	/**
	 * 行驶记录分析
	 * @param vo
	 * @return
	 * @author:zhangy
	 * @email:zhangyu2222z@sina.cn
	 */
	@SuppressWarnings("rawtypes")
	@RequestMapping("/getDrivingRecordAnalysis")
	@ResponseBody
	public Object getDrivingRecordAnalysis(CommonParamsVo params){
		List list = phoneMotionStatusService.getDrivingRecordAnalysis(params);
		return this.getReturnResult(list);
	}

	
	
	/** 
     * 查询行车记录分析图表
     * @param vo
     * @return
     * @throws Exception
     */
    @RequestMapping("/getRecordAnalysisChart")
    @ResponseBody
    public Object getRecordAnalysisChart(CommonParamsVo params) throws Exception {
        List<PhoneDrivingRecordAnalysisVo> list = phoneMotionStatusService.searchRecordAnalysisChart(params);
        return this.getReturnResult(list);
    }
	
}
